package com.yizhuoyan.game.fiveinarow.model;

/**
 * 一颗棋子
 * @author Administrator
 *
 */
public class ChessPieces {
	/**
	 * 0=黑色
	 * 1=白色
	 */
	private final int color;
	
	
	/**
	 * 坐标
	 */
	private  int x,y;
	
	
	public ChessPieces(int color) {
		this.color=color;
	}


	public int getX() {
		return x;
	}


	public void setX(int x) {
		this.x = x;
	}


	public int getY() {
		return y;
	}


	public void setY(int y) {
		this.y = y;
	}


	public int getColor() {
		return color;
	}
	
	public boolean sameColor(int color) {
		return this.color==color;
	}
	
	public void paint() {
		if(this.color==0) {
			System.out.print("●");
		}else {
			System.out.print("○");
		}
	}
	
}
